package cn.wusifx.zabbix.request.builder.user;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/usermacro/update
 */
public class UserMacroUpdateRequestBuilder extends UpdateRequestBuilder {
    private String hostmacroId;
    public UserMacroUpdateRequestBuilder(String auth) {
        super("usermacro.update", auth);
    }

    public UserMacroUpdateRequestBuilder( Long id, String auth) {
        super("usermacro.update", id, auth);
    }

    public String getHostmacroId() {
        return hostmacroId;
    }

    public UserMacroUpdateRequestBuilder setHostmacroId(String hostmacroId) {
        this.hostmacroId = hostmacroId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("hostmacroid",hostmacroId);
        return baseRequest;
    }
}
